var express = require('express');
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res) {
  res.send('respond with a resource');
});

// 测试匹配规则
// http://localhost:3000/users
// /abc -> 匹配到/abc
// /abc/xyz ->匹配到 /abc/xyz, 不会先 or 后 匹配到 /abc
// /abc/xyz/aa ->无匹配的路由
router.get('/abc',function(req,res,next){
    console.log('/abc');
    next(req,res);
});

router.get('/abc/xyz',function(req,res,next){
    console.log('/abc/xyz');
    next(req,res);
});

module.exports = router;
